{include file="public/layout" /}
{include file="gzh/header" /}

<body class="bodystyle" style="overflow-y: scroll; cursor: default; -moz-user-select: inherit;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page min-hg-c-10">
    
    <div class="flexigrid">
        <div class="mDiv">
            <div class="ftitle">
                <h3>关键词列表</h3>
                <h5>(共{$pageObj->totalRows}条记录)</h5>
            </div>
            <div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
            <form class="navbar-form form-inline" action="{:url('Gzh/selcet_keyword_list')}" method="get" onsubmit="layer_loading('正在处理');">
                {$searchform.hidden|default=''}
                <div class="sDiv">
                    <div class="sDiv2">
                        <input type="text" size="30" name="keyword" value="{$Request.param.keyword}" class="qsbox" placeholder="关键字...">
                        <input type="submit" class="btn" value="搜索">
                        <i class="iconfont e-sousuo"></i>
                    </div>
                    <div class="sDiv2">
                        <input type="button" class="btn" value="重置" onclick="window.location.href=' {:url(\'Gzh/selcet_keyword_list\')}';">
                    </div>
                </div>
            </form>
        </div>
        <div class="hDiv">
            <div class="hDivBox">
                <table cellspacing="0" cellpadding="0" style="width: 100%">
                    <thead>
                    <tr>
                        <th abbr="article_title" axis="col3" class="">
                            <div class="">关键字</div>
                        </th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
        <div class="bDiv" style="height: auto;">
            <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
                <table style="width: 100%;">
                    <tbody>
                    {empty name="list"}
                    <tr>
                        <td class="no-data" align="center" axis="col0" colspan="50">
                            <i class="fa fa-exclamation-circle"></i>没有符合条件的记录
                        </td>
                    </tr>
                    {else/}
                    {foreach name="list" item="vo" key="k" }
                    <tr>
                        <td style="width: 100%;display: flex;flex-wrap: wrap;">
                            {foreach name="$vo.keywords" item="voo" key="k" }
                            <div style="margin: 5px;display: flex;border: 1px solid #9999;border-radius: 5px;padding: 2px 0;">
                                <div style="border-right:1px solid #9999;padding: 0 10px;margin:5px 0;line-height: 14px !important;">{$voo}</div>
                                <div style="padding: 0 10px;margin: 5px;line-height: 14px !important;" class="blue" onclick="parent.chooseKeyword(this, '{$voo}');" >选择</div>
                            </div>
                            {/foreach}
                        </td>
                    </tr>
                    {/foreach}
                    {/empty}
                    </tbody>
                </table>
            </div>
            <div class="iDiv" style="display: none;"></div>
        </div>
        <div class="tDiv">
            <div class="tDiv2">
            </div>
            <div style="clear:both"></div>
        </div>
        <!--分页位置-->
        {$pageStr}
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function(){

        // 表格行点击选中切换
        $('#flexigrid > table>tbody >tr').click(function(){
            $(this).toggleClass('trSelected');
        });

        // 点击刷新数据
        $('.fa-refresh').click(function(){
            location.href = location.href;
        });
    });

    function preview(url){
        layer.open({
            type: 1,
            title: false,
            closeBtn: true,
            area: ['300px','auto'],
            skin: 'layui-layer-nobg', //没有背景色
            shadeClose: false,
            content: "<img src='"+url+"' width='300' height='300'>"
        });
    }
</script>
{include file="public/footer" /}